﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using ZhiAo.CommonLibrary;
using ECI.SSO.BizEntity;
using System.Data;

namespace ZhiAo.Management
{
    public class RoleRight
    {
        /// <summary>
        /// 功能点权限判断
        /// </summary>
        /// <param name="Code">功能点代码</param>
        /// <returns></returns>
        public static bool HasRight(string Code)
        {
            try
            {
                DataTable funs = UserInfo.CurrentUserInfo.Functions;
                
                DataRow[] result= funs.Select("code=" + Code);
                return result.Length>0 ;
            }
            catch
            {
                return false;
            }
        }
    }
}
